1bashThis demonstrates using curl to download a resource, resume if interrupted, follow redirects, and save it with the original filename.curl -C - -L -O "https://example.com/example.resource"external toolscurldownload resource
2bashThis demonstrates sending an HTTP GET request with a custom User-Agent header using curl.curl --header "User-Agent: Foo" https://example.comexternal toolscurlHTTP requestcustom headers
3bashThis demonstrates using curl with basic authentication to access a URL by specifying a username and password.curl --user name:password http://www.example.comexternal toolscurlHTTP requestsbasic authentication
4bashThis code uses curl to make a request to curl.se through a proxy server, authenticating with the username proxyuser and password proxypassword. This demonstrates how to use curl with proxy authentication.curl --proxy-user proxyuser:proxypassword curl.seexternal toolscurl
5bashThis demonstrates using curl to make an HTTP request with a specified referer header.curl --referer http://www.example.come http://www.example.comexternal toolscurlHTTP requestreferer header
6bashThis demonstrates using curl to make an HTTP request through a proxy server.curl --proxy http://proxy.example.org:4321 http://remote.example.org/external toolscurlHTTP request with proxy
7bashThis demonstrates profiling HTTP request timings using curl by measuring connection time, time to first byte, and total time for a request.curl -w "Connect time: %{time_connect} Time to first byte: %{time_starttransfer} Total: %{time_total} \n" "http://example.com/1/endpoint" -s -o /dev/nullexternal toolscurlHTTP request timing profiling
8bashThis demonstrates sending an HTTP request with a custom user-agent using curl.curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]external toolscurlhttp requestscustom user-agent
9bashThis demonstrates debugging HTTP requests using curl's --trace-ascii option to log detailed request and response traces.curl --trace-ascii debugdump.txt http://www.example.com/external toolscurldebugging and tracingrequest tracing
10bashThis demonstrates using curl to send an HTTP request with an empty Host header.curl --header "Host:" http://www.example.comexternal toolscurlHTTP request customizationheader manipulation
11bashThis demonstrates using curl to chain multiple HTTP requests in a single command, including a POST request with data and a subsequent GET request.curl -d score=10 http://example.com/post.cgi --next http://example.com/results.htmlexternal toolscurlchaining HTTP requests
12bashThis demonstrates sending a POST request with a file as binary data using curl.curl -X POST \ -H "Content-Type: text/xml" \ --data-binary "@path/to/file.xml" \ http://example.comexternal toolscurlHTTP operationsPOST request
13bashThis demonstrates sending a PROPFIND HTTP request with XML data and custom headers using curl.curl --data "<xml>" --header "Content-Type: text/xml" --request PROPFIND example.comexternal toolscurlHTTP requestscustom headers and data
14bashThis demonstrates sending a POST request with curl to multiple URLs in a single command.curl --data name=curl http://url1.example.com http://url2.example.comexternal toolscurlHTTP requestsPOST request
15bashThis snippet demonstrates using curl with a client certificate (mycert.pem) to make a secure HTTPS request to https://secure.example.com. This is an example of how to authenticate with a client certificate in a curl request.curl --cert mycert.pem https://secure.example.comexternal toolscurl
16bashThis code demonstrates how to use curl to make an HTTP request with basic authentication.curl -u user:password http://example.org/external toolscurlbasic authentication
17bashThis code uses curl to send an HTTP GET request to a web server at a specified port.curl http://www.example.org:1234/external toolscurlHTTP requestsGET request
18bashThis demonstrates making an HTTP request with basic authentication using curl.curl http://user:password@example.org/external toolscurlHTTP requestbasic authentication
19bashThis demonstrates using curl to download a file from a remote URL and save it locally with a specified name.curl --remote-name foo.txt https://example.comexternal toolscurlfile download
20bashThis demonstrates sending an HTTP GET request using curl with the --location option to follow redirects.curl --location https://example.comexternal toolscurlHTTP GET request with redirect following